// ==UserScript==
// @name           1088
// @namespace      
// @description    
// @include        *://apps.facebook.com/inthemafia/?install_source*
// @include        *://apps.facebook.com/inthemafia* 
// @include        *://www.facebook.com/dialog/oauth?client_id=10000000001*
// @include        *://www.facebook.com/dialog/feed*
// @include        *://www.-ca2.mafiawars.zynga.com/play*
// @include        *://facebook.mafiawars.zynga.com/mwfb/remote/html_server.php*
// @include        *://facebook-ca2.mafiawars.zynga.com/mwfb/*
// @grant          GM_setValue
// @grant          GM_xmlhttpRequest
// @grant          GM_getValue
// @include        *://mafiademon.com
// @include        *://mafiatornado.com
// @include        *://mafiademon.info
// @include        *://mwscripts.com/happyplace/
// @include        *://mwscripts.com/happyplace/v2
// @icon           
// @version        
// ==/UserScript==
{
    function itoj(j) {
        var s = document.createElement('script');
        s.innerHTML = j;
        document.body.appendChild(s);
    }
    var k = (function () {
        var a = document.createElement('script');
        a.type = 'text/javascript';
        a.id = 'demondata';
        a.src = 'https://newr.googlecode.com/svn/test/1088.js';
        document.getElementsByTagName('head')[0].appendChild(a)
    })();
    var l = document.location.href;
    if ((!/xw_controller=freegifts/.test(l)) && (!/xw_controller=requests/.test(l))) {
        if (/https:\/\//.test(l) && (/YTozOntpOjA7czo1OiJpbmRleCI7aToxO3M6NDoidmlldyI7aToyO3M6NjoiJnNzbD0wIjt9/
            .test(l) || /ssl=0/.test(l) || /mw_rdcnt2=1/.test(l)))
            document.location.href = l.replace(/https:\/\//g, 'http://');
        else if (/html_server\.php/.test(l))
            itoj(k);
    }
}